package com.roncoo.education.course.feign.interfaces;

import com.roncoo.education.course.feign.qo.UserCourseAppointmentQO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 课程预约
 */
@FeignClient(value = "roncoo-education-course-service")
public interface IFeignUserCourseAppointment {

    /**
     * 课程预约动作，保存用户和课程id
     * @param qo
     * @return
     * @author wangrong
     */
    @RequestMapping(value = "/feign/course/appointment/save", method = RequestMethod.POST)
    int save(@RequestBody UserCourseAppointmentQO qo);

    /**
     * 课程预约后以钉钉消息形式通知用户
     * @param userNo
     * @param message
     * @return
     * @author wangrong
     */
    @RequestMapping(value = "/feign/course/appointment/send", method = RequestMethod.POST)
    int sendMsg(@RequestParam Long userNo, @RequestParam String message);

}
